home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1995 March / Macworld CD-ROM (March 1995).cdr / Demos / Wrath of the Gods / 31AM1 / 00001.ls next >
Encoding:
Text File  |  1994-07-14  |  7.8 KB  |  333 lines

  1. on setlocal
  2. end
  3.  
  4. on killLocal
  5. end
  6.  
  7. on OrSend
  8.   global currentGems, firstOr, o31a, orCount
  9.   if currentGems = 0 then
  10.     if firstOr = 0 then
  11.       set firstOr to 1
  12.       goOr("oQ6")
  13.     else
  14.       if firstOr = 1 then
  15.         goOr("oQ5")
  16.       end if
  17.     end if
  18.   else
  19.     if currentGems > 0 then
  20.       if firstOr = 0 then
  21.         set firstOr to 1
  22.         goOr("oQ6")
  23.       else
  24.         if firstOr = 1 then
  25.           if o31a < 3 then
  26.             if orCount = 0 then
  27.               set orCount to 1
  28.               goOr("oQ1")
  29.             else
  30.               if orCount = 1 then
  31.                 set orCount to 2
  32.                 goOr("oQ2")
  33.               else
  34.                 if orCount = 2 then
  35.                   set orCount to 0
  36.                   goOr("oQ3")
  37.                 end if
  38.               end if
  39.             end if
  40.           else
  41.             if o31a = 3 then
  42.               goOr("oQ4")
  43.             else
  44.               if o31a = 4 then
  45.                 goOr("endO")
  46.               end if
  47.             end if
  48.           end if
  49.         end if
  50.       end if
  51.     end if
  52.   end if
  53. end
  54.  
  55. on hintSet
  56.   global o31a
  57.   puppetSprite(8, 1)
  58.   puppetSprite(9, 1)
  59.   puppetSprite(10, 1)
  60.   if o31a = 1 then
  61.     set the castNum of sprite 8 to the number of cast "hint1"
  62.   else
  63.     if o31a = 2 then
  64.       set the castNum of sprite 8 to the number of cast "hint2"
  65.       set the castNum of sprite 9 to the number of cast "upAr"
  66.     else
  67.       if o31a = 3 then
  68.         set the castNum of sprite 8 to the number of cast "hint3"
  69.         set the castNum of sprite 9 to the number of cast "upAr"
  70.       else
  71.         if o31a = 4 then
  72.           set the castNum of sprite 8 to the number of cast "hint4"
  73.           set the castNum of sprite 9 to the number of cast "upAr"
  74.         end if
  75.       end if
  76.     end if
  77.   end if
  78. end
  79.  
  80. on killOrPup
  81.   puppetSprite(8, 0)
  82.   puppetSprite(9, 0)
  83.   puppetSprite(10, 0)
  84. end
  85.  
  86. on hint
  87.   global o31a
  88.   if o31a = 0 then
  89.     doSound("freeHint")
  90.     set o31a to 1
  91.     set the castNum of sprite 8 to the number of cast "hint1"
  92.   else
  93.     if o31a = 1 then
  94.       calcScore(-5)
  95.       set o31a to 2
  96.       set the castNum of sprite 8 to the number of cast "hint2"
  97.       set the castNum of sprite 9 to the number of cast "upAr"
  98.       set the castNum of sprite 10 to 0
  99.     else
  100.       if o31a = 2 then
  101.         calcScore(-5)
  102.         set o31a to 3
  103.         set the castNum of sprite 8 to the number of cast "hint3"
  104.         set the castNum of sprite 9 to the number of cast "upAr"
  105.         set the castNum of sprite 10 to 0
  106.       else
  107.         if o31a = 3 then
  108.           calcScore(-5)
  109.           set o31a to 4
  110.           set the castNum of sprite 8 to the number of cast "hint4"
  111.           set the castNum of sprite 9 to the number of cast "upAr"
  112.           set the castNum of sprite 10 to 0
  113.         end if
  114.       end if
  115.     end if
  116.   end if
  117. end
  118.  
  119. on upArrow
  120.   global o31a
  121.   if o31a = 2 then
  122.     set the castNum of sprite 8 to the number of cast "hint1"
  123.     set the castNum of sprite 9 to 0
  124.     set the castNum of sprite 10 to the number of cast "downAr"
  125.   else
  126.     if o31a = 3 then
  127.       if the castNum of sprite 8 = the number of cast "hint3" then
  128.         set the castNum of sprite 8 to the number of cast "hint2"
  129.         set the castNum of sprite 9 to the number of cast "upAr"
  130.         set the castNum of sprite 10 to the number of cast "downAr"
  131.       else
  132.         if the castNum of sprite 8 = the number of cast "hint2" then
  133.           set the castNum of sprite 8 to the number of cast "hint1"
  134.           set the castNum of sprite 9 to 0
  135.           set the castNum of sprite 10 to the number of cast "downAr"
  136.         end if
  137.       end if
  138.     else
  139.       if o31a = 4 then
  140.         if the castNum of sprite 8 = the number of cast "hint4" then
  141.           set the castNum of sprite 8 to the number of cast "hint3"
  142.           set the castNum of sprite 9 to the number of cast "upAr"
  143.           set the castNum of sprite 10 to the number of cast "downAr"
  144.         else
  145.           if the castNum of sprite 8 = the number of cast "hint3" then
  146.             set the castNum of sprite 8 to the number of cast "hint2"
  147.             set the castNum of sprite 9 to the number of cast "upAr"
  148.             set the castNum of sprite 10 to the number of cast "downAr"
  149.           else
  150.             if the castNum of sprite 8 = the number of cast "hint2" then
  151.               set the castNum of sprite 8 to the number of cast "hint1"
  152.               set the castNum of sprite 9 to 0
  153.               set the castNum of sprite 10 to the number of cast "downAr"
  154.             end if
  155.           end if
  156.         end if
  157.       end if
  158.     end if
  159.   end if
  160. end
  161.  
  162. on downArrow
  163.   global o31a
  164.   if o31a = 2 then
  165.     set the castNum of sprite 8 to the number of cast "hint2"
  166.     set the castNum of sprite 9 to the number of cast "upAr"
  167.     set the castNum of sprite 10 to 0
  168.   else
  169.     if o31a = 3 then
  170.       if the castNum of sprite 8 = the number of cast "hint1" then
  171.         set the castNum of sprite 8 to the number of cast "hint2"
  172.         set the castNum of sprite 9 to the number of cast "upAr"
  173.         set the castNum of sprite 10 to the number of cast "downAr"
  174.       else
  175.         if the castNum of sprite 8 = the number of cast "hint2" then
  176.           set the castNum of sprite 8 to the number of cast "hint3"
  177.           set the castNum of sprite 9 to the number of cast "upAr"
  178.           set the castNum of sprite 10 to 0
  179.         end if
  180.       end if
  181.     else
  182.       if o31a = 4 then
  183.         if the castNum of sprite 8 = the number of cast "hint1" then
  184.           set the castNum of sprite 8 to the number of cast "hint2"
  185.           set the castNum of sprite 9 to the number of cast "upAr"
  186.           set the castNum of sprite 10 to the number of cast "downAr"
  187.         else
  188.           if the castNum of sprite 8 = the number of cast "hint2" then
  189.             set the castNum of sprite 8 to the number of cast "hint3"
  190.             set the castNum of sprite 9 to the number of cast "upAr"
  191.             set the castNum of sprite 10 to the number of cast "downAr"
  192.           else
  193.             if the castNum of sprite 8 = the number of cast "hint3" then
  194.               set the castNum of sprite 8 to the number of cast "hint4"
  195.               set the castNum of sprite 9 to the number of cast "upAr"
  196.               set the castNum of sprite 10 to 0
  197.             end if
  198.           end if
  199.         end if
  200.       end if
  201.     end if
  202.   end if
  203. end
  204.  
  205. on bk
  206.   global mode
  207.   if mode = 3 then
  208.     nothing()
  209.   end if
  210. end
  211.  
  212. on you
  213.   global mode
  214.   if mode = 3 then
  215.     nothing()
  216.   end if
  217. end
  218.  
  219. on sky
  220.   global mode
  221.   if mode = 3 then
  222.     lookItem("Looks like the sky")
  223.   end if
  224. end
  225.  
  226. on sea
  227.   global mode
  228.   if mode = 3 then
  229.     lookItem("Looks like the sea")
  230.   end if
  231. end
  232.  
  233. on argo
  234.   global mode
  235.   if mode = 3 then
  236.     lookItem("Looks like the Argo")
  237.   end if
  238. end
  239.  
  240. on x1
  241.   global mode, cont
  242.   if mode = 1 then
  243.     set cont to 1
  244.     go("x*tiller")
  245.   else
  246.     if mode = 3 then
  247.       lookItem("Looks like the tiller")
  248.     end if
  249.   end if
  250. end
  251.  
  252. on cx1
  253.   global cont
  254.   if cont = 1 then
  255.     set cont to 0
  256.     go("take tiller")
  257.   end if
  258. end
  259.  
  260. on x2
  261.   global mode, cont
  262.   if mode = 3 then
  263.     lookItem("Looks like the Argo")
  264.   end if
  265. end
  266.  
  267. on cx2
  268.   global useWax31a, crash30a
  269.   if useWax31a = 1 then
  270.     set useWax31a to 0
  271.     go("sail on")
  272.   else
  273.     go("crash")
  274.   end if
  275. end
  276.  
  277. on c2x2
  278.   sound stop 1
  279.   go("Q2")
  280. end
  281.  
  282. on c3x2
  283.   go(1, "32AM1")
  284. end
  285.  
  286. on x3
  287.   global mode, invCurrent, useWax31a
  288.   if (mode = 4) and (useWax31a = 0) and ((invCurrent = "w26a") or (invCurrent = "c67a")) then
  289.     set useWax31a to 1
  290.     doSound("grabInventory")
  291.     go("use wax")
  292.   end if
  293. end
  294.  
  295. on cx3
  296.   go("at x")
  297. end
  298.  
  299. on s1
  300.   global mode
  301.   if (mode = 1) or (mode = 3) then
  302.     set the castNum of sprite 24 to 0
  303.     when keyDown then nothing
  304.     goOr("siren")
  305.   end if
  306. end
  307.  
  308. on v1
  309.   global mode
  310.   if mode = 1 then
  311.     go("removes wax")
  312.   end if
  313. end
  314.  
  315. on c2v1
  316.   go("hears")
  317. end
  318.  
  319. on c3v1
  320.   go("disembarked", "32AM1")
  321. end
  322.  
  323. on cv1
  324.   go("Q3")
  325. end
  326.  
  327. on v2
  328.   global mode
  329.   if mode = 3 then
  330.     lookItem("Looks like the tiller")
  331.   end if
  332. end
  333.